package com.quick.util;

import com.quick.service.Ii18nService;
import com.quick.spring.SpringUtil;

public class I18nTool {
	
	public  static String languageText(String code,String ...args) {
		Ii18nService ii18nService = SpringUtil.getBean(Ii18nService.class);
		String language = ii18nService.getLanguage();
		if(args == null){
			return ii18nService.getLanguageText(code, language);
		}
		return ii18nService.getLanguageText(code, language,args);
	}
	
	
	public  static String languageText(String code) {
		Ii18nService ii18nService = SpringUtil.getBean(Ii18nService.class);
		String language = ii18nService.getLanguage();
		return ii18nService.getLanguageText(code, language);
	}
}
